POV-Ray : Newsgroups : povray.newusers : Collision detection : Re: Collision detection Server Time
5 Sep 2024 18:22:02 EDT (-0400)
  Re: Collision detection  
From: Tom Melly
Date: 14 Jan 2000 10:47:00
Message: <387f44f4@news.povray.org>
Chris Huff <chr### [at] yahoocom> wrote in message
news:chrishuff_99-43AE9F.09560714012000@news.povray.org...
> In article <387f2261@news.povray.org>, "Tom Melly"
> <tom### [at] tomandluforce9couk> wrote:
>
> What do you want to detect collisions of? If it is simply two spheres,
> use something like
> #if(vlength(CenterA - CenterB)<(RadiusA + RadiusB))
>    // spheres are colliding
> #else
>    // spheres are not colliding
> #end
>
> The math is pretty simple for many other objects. I don't know of any
> macros for this.
>

hmm, I was more thinking of, for example, being able to place random rocks
on the surface of a heightfield by detecting when you'd hit the y value of
the hf at a particular x and z location.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.